A California appeals court ruling that Uber Technologies Inc. and Lyft, Inc. must treat their drivers as employees not only portends steep increases in operating costs that the companies say they can’t afford, but gives workers legal backup to secure a slew of new labor protections.

It defined even more strongly that the ride-sharing companies’ futures will hinge on how California voters decide Proposition 22, a ballot measure that would exempt them from the rigid state law on worker classification that the appeals court backed in its ruling. Polls have indicated the vote, on what has become the most expensive voter initiative in state history, is likely to be close.